#ifndef PresentationParameters_h
#define PresentationParameters_h

#include <Defines.h>
#include <CSharpPropertyMethods.h>

// Riccsson includes.
#include <System/Object.h>
#include <System/IntPtr.h>
#include <System/Type.h>
#include <System/String.h>

// XNA includes.
#include "../DisplayOrientation.h"
#include "../Rectangle.h"
#include "States/DepthFormat.h"
#include "SurfaceFormat.h"
#include "RenderTargetUsage.h"
#include "PresentInterval.h"

namespace Riccsson
{
	namespace Xna
	{
		namespace Framework
		{
			namespace Graphics
			{
				class PresentationParameters
					: public Riccsson::System::IDisposable
				{
					#pragma region Constants

					public: static const int DefaultPresentRate = 60;

					#pragma endregion Constants

					#pragma region Private Fields

					private: DepthFormat depthStencilFormat;
					private: SurfaceFormat backBufferFormat;
					private: int backBufferHeight;
					private: int backBufferWidth;
					private: Riccsson::System::IntPtr deviceWindowHandle;
					private: bool isFullScreen;
					private: int multiSampleCount;
					private: bool disposed;

					PROP3(PresentationParameters, SurfaceFormat, BackBufferFormat)
					PROP3(PresentationParameters, int, BackBufferHeight)
					PROP3(PresentationParameters, int, BackBufferWidth)
					PROP3(PresentationParameters, Rectangle, Bounds)
					PROP3(PresentationParameters, Riccsson::System::IntPtr, DeviceWindowHandle)
					PROP3(PresentationParameters, DepthFormat, DepthStencilFormat)
					PROP3(PresentationParameters, bool, IsFullScreen)
					PROP3(PresentationParameters, int, MultiSampleCount)

					#pragma endregion Private Fields

					#pragma region Constructors
					
					COPY_CONSTRUCTOR(PresentationParameters)
					{
						PROP3_INIT_COPY(PresentationParameters, SurfaceFormat, BackBufferFormat);
						PROP3_INIT_COPY(PresentationParameters, int, BackBufferHeight);
						PROP3_INIT_COPY(PresentationParameters, int, BackBufferWidth);
						PROP3_INIT_COPY(PresentationParameters, Rectangle, Bounds);
						PROP3_INIT_COPY(PresentationParameters, Riccsson::System::IntPtr, DeviceWindowHandle);
						PROP3_INIT_COPY(PresentationParameters, DepthFormat, DepthStencilFormat);
						PROP3_INIT_COPY(PresentationParameters, bool, IsFullScreen);
						PROP3_INIT_COPY(PresentationParameters, int, MultiSampleCount);
					}

					public: PresentationParameters();

					~PresentationParameters();

					#pragma endregion Constructors

					#pragma region Properties

					public: PROP3_GET(SurfaceFormat, BackBufferFormat);
					public: PROP3_SET(SurfaceFormat, BackBufferFormat);
					public: PROP3_GET(int, BackBufferHeight);
					public: PROP3_SET(int, BackBufferHeight);
					public: PROP3_GET(int, BackBufferWidth);
					public: PROP3_SET(int, BackBufferWidth);
					public: PROP3_GET(Rectangle, Bounds);
					public: PROP3_SET(Rectangle, Bounds){throw;}
					public: PROP3_GET(Riccsson::System::IntPtr, DeviceWindowHandle);
					public: PROP3_SET(Riccsson::System::IntPtr, DeviceWindowHandle);
			#if WINDOWS_STOREAPP
					public: SwapChainBackgroundPanel SwapChainPanel { get; set; }
			#endif
					public: PROP3_GET(DepthFormat, DepthStencilFormat);
					public: PROP3_SET(DepthFormat, DepthStencilFormat);
					public: PROP3_GET(bool, IsFullScreen);
					public: PROP3_SET(bool, IsFullScreen);
					public: PROP3_GET(int, MultiSampleCount);
					public: PROP3_SET(int, MultiSampleCount);

					public: PresentInterval PresentationInterval;
					public: DisplayOrientation displayOrientation;
					public: RenderTargetUsage renderTargetUsage;

					#pragma endregion Properties


					#pragma region Methods

					public: void Clear();
					public: GC_PTR<PresentationParameters> Clone();
					public: void Dispose();
					protected: virtual void Dispose(bool disposing);

					#pragma endregion Methods

				};
			}
		}
	}
}

#endif
